<!DOCTYPE html>
<html style="background-color: #ACD4F0;">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title><?php echo $title ?></title>
        <script type="text/javascript">
            var BASE_URL='<?=Url::base();?>';
        </script>
        
        <?php foreach ($styles as $file => $type) echo HTML::style($file, array('media' => $type)), PHP_EOL ?>
        <?php foreach ($scripts as $file) echo HTML::script($file), PHP_EOL ?>
    </head>
    <body>
        <?if($window):?>
        <div id="content">
            <script type="text/javascript">
                window.addEvent('domready', function(){
                    $$('form').each(function(form){
                        new Element('input', {'type':'hidden','name':'window','value':'1'}).inject(form,'top');
                    })
                });
            </script>
            
            <?php echo $content ?>
        </div>
        <?else:?>
        <div id="wraper">
            <div id="logo_wrap">
                <h1>System Zarządzania Firmą</h1>
            </div>
            <div id="header">
                <div id="top_menu">
                    <?php echo $top_menu ?>
                </div>
            </div>
            <?if($top_action_menu):?>
            <div id="top_action_menu">
                <?=$top_action_menu?>
            </div>
            <?endif;?>
            <div id="content">
                <?php echo $content ?>
            </div>
        </div>
        <?endif;?>
    </body>
</html>
